const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: './',
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')); // key,value自行定义，比如.set('@@', resolve('src/components'))

    config.output.filename('[name].[hash].js').end();

  },
  devServer: {
    port: 8802,
    open: true,
    overlay: {
      warnings: false,
      errors: false,
    },
    proxy: {
      '/api': {
        target: 'http://10.1.5.22:8762/csmp/',
        pathRewrite: { '^/api': '' },
        changeOrigin: true,
      }
    }
  }
}
